<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <link rel="icon" href="img/favicon.ico">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="layui/css/layui.css">
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/vendor.min.css">
    <link rel="stylesheet" href="css/plugins.min.css">
    <link rel="stylesheet" href="css/style.min.css">
    <style>
        html{
            height: 100%;
            overflow-y: hidden;
        }
        body{
            height: 100%;
            overflow-y: auto;
        }
        .wenzi{
            background-color: #215083;padding: 10px 15px;text-align: center;color: white;width: 150px;margin: auto;
        }
        .zi{
            padding: 5px 0 5px 10px;
        }
        .gongsi{
            font-size: 13px;border: 1px solid #9a9a9a;width: 20%;height: 260px;margin: 10px;
        }
        .bianju{
            padding-left: 20px;margin-top: 15px;
        }
        .quyu{
            display: flex;justify-content: start;flex-wrap: wrap;flex-direction: row;
        }
    </style>
</head>
<body>

<div class="container" style="margin-top: 20px;">
    <div class="row">
        <div class="col-lg-6">
            <div class="single-product-img h-100">
                <div class="swiper-container single-product-slider">
                    <div class="swiper-wrapper">
                        <div class="swiper-slide">
                            <a class="single-img gallery-popup" id="pic-bac">
                                <img class="img-full" src="" style="width: 540px;height: 380px;" id="pic-bac2">
                            </a>
                        </div>
                    </div>
                    <div class="swiper-pagination"></div>
                </div>
            </div>
        </div>
        <div class="col-lg-6">
            <div class="product-thumb-with-content row">
                <div class="col-12 order-lg-1 order-2 pt-10 pt-lg-0">
                    <div class="single-product-content">
                        <h2 class="title">客户服务</h2>
                        <p class="short-desc mb-6" id="detail">详情介绍</p>
                    </div>
                </div>
                <div class="col-12 order-lg-2 order-1 pt-10 pt-lg-0">
                    <div class="swiper-container single-product-thumbs">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div style="margin-bottom: 50px;">
        <h5>省级分公司</h5>
        <div id="sjfgs">
<!--            <div class="bianju">-->
<!--                <div><h5>北部区域</h5></div>-->
<!--                <div class="bianju quyu">-->
<!--                    <div class="gongsi">-->
<!--                        <div class="wenzi">丰沙里省分公司</div>-->
<!--                        <div class="zi">丰沙里县盆沙阿村</div>-->
<!--                        <div class="zi">致电:(856) -20 22395006</div>-->
<!--                        <div class="zi">致电:(856) -20 22395011</div>-->
<!--                        <div class="zi">传真：(856) 88 210552</div>-->
<!--                        <div class="zi">红沙办事处: (074) 266000</div>-->
<!--                        <div class="zi">湄公大坝办事处: (074) 550000</div>-->
<!--                    </div>-->
<!--                    <div class="gongsi">-->
<!--                        <div class="wenzi">丰沙里省分公司</div>-->
<!--                        <div class="zi">丰沙里县盆沙阿村</div>-->
<!--                        <div class="zi">致电:(856) -20 22395006</div>-->
<!--                        <div class="zi">致电:(856) -20 22395011</div>-->
<!--                        <div class="zi">传真：(856) 88 210552</div>-->
<!--                    </div>-->
<!--                    <div class="gongsi">-->
<!--                        <div class="wenzi">丰沙里省分公司</div>-->
<!--                        <div class="zi">丰沙里县盆沙阿村</div>-->
<!--                        <div class="zi">致电:(856) -20 22395006</div>-->
<!--                        <div class="zi">致电:(856) -20 22395011</div>-->
<!--                        <div class="zi">传真：(856) 88 210552</div>-->
<!--                    </div>-->
<!--                    <div class="gongsi">-->
<!--                        <div class="wenzi">丰沙里省分公司</div>-->
<!--                        <div class="zi">丰沙里县盆沙阿村</div>-->
<!--                        <div class="zi">致电:(856) -20 22395006</div>-->
<!--                        <div class="zi">致电:(856) -20 22395011</div>-->
<!--                        <div class="zi">传真：(856) 88 210552</div>-->
<!--                    </div>-->
<!--                    <div class="gongsi">-->
<!--                        <div class="wenzi">丰沙里省分公司</div>-->
<!--                        <div class="zi">丰沙里县盆沙阿村</div>-->
<!--                        <div class="zi">致电:(856) -20 22395006</div>-->
<!--                        <div class="zi">致电:(856) -20 22395011</div>-->
<!--                        <div class="zi">传真：(856) 88 210552</div>-->
<!--                    </div>-->
<!--                    <div class="gongsi">-->
<!--                        <div class="wenzi">丰沙里省分公司</div>-->
<!--                        <div class="zi">丰沙里县盆沙阿村</div>-->
<!--                        <div class="zi">致电:(856) -20 22395006</div>-->
<!--                        <div class="zi">致电:(856) -20 22395011</div>-->
<!--                        <div class="zi">传真：(856) 88 210552</div>-->
<!--                    </div>-->
<!--                    <div class="gongsi">-->
<!--                        <div class="wenzi">丰沙里省分公司</div>-->
<!--                        <div class="zi">丰沙里县盆沙阿村</div>-->
<!--                        <div class="zi">致电:(856) -20 22395006</div>-->
<!--                        <div class="zi">致电:(856) -20 22395011</div>-->
<!--                        <div class="zi">传真：(856) 88 210552</div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
        </div>
    </div>
</div>

<script src="js/vendor.min.js"></script>
<script src="js/plugins.min.js"></script>
<script src="js/main.min.js"></script>
<script src="layui/layui.js"></script>
<script src="js/token.js"></script>
<script src="js/config.js"></script>
<script src="js/jquery.i18n.min.js"></script>
<script src="js/multi_lang_config.js"></script>
<script>

    var layer = layui.layer;
    var form = layui.form;

    var moduleName = "subMain";
    var defaultLang = layui.data('langTab').langType;
    initLangConfig({
        defaultLang:defaultLang,
        filePath: "js/i18n/"+moduleName+"/",
        module:moduleName,
        base:"js/"
    })
    var i18np = null;
    function changeLang(lang) {
        defaultLang = lang;
        reloadI18n({
            defaultLang:lang,
            filePath: "js/i18n/"+moduleName+"/",
            module:moduleName,
        })
        i18np.loadProperties(moduleName);
        khfwDataInit();
    }

    layui.config({base: 'js/'})
        // 继承treetable.js插件
        .extend({i18np: 'i18n'}).use([ 'i18np','jquery'], function () {
        i18np = layui.i18np;
        i18np.loadProperties(moduleName);
    });

    var khfwData = {};
    function khfwDataInit(){
        let company = khfwData.company;
        let s = "";
        if (defaultLang == "zh") {
            $('#detail').html(khfwData.customerService.detailZh);
            for (var i=0;i<company.length;i++){
                let ss = "";
                for (var j=0;j<company[i].companyList.length;j++){
                    let sss = "";
                    for (var k=0;k<company[i].companyList[j].companyOfficeList.length;k++){
                        sss = sss + "<div class=\"zi\">"+company[i].companyList[j].companyOfficeList[k].nameZh+":"+company[i].companyList[j].companyOfficeList[k].phone+"</div>";
                    }
                    ss = ss + "<div class=\"gongsi\">\n" +
                        "                        <div class=\"wenzi\">"+company[i].companyList[j].companyNameZh+"</div>\n" +
                        "                        <div class=\"zi\">"+company[i].companyList[j].addressZh+"</div>\n" +
                        "                        <div class=\"zi\">致电:"+company[i].companyList[j].phoneOne+"</div>\n" +
                        "                        <div class=\"zi\">致电:"+company[i].companyList[j].phoneTwo+"</div>\n" +
                        "                        <div class=\"zi\">传真:"+company[i].companyList[j].fax+"</div>"
                        + sss + "</div>";
                }
                // if (ss != ""){
                s = s + "<div class=\"bianju\">\n" +
                    "                <div><h5>"+company[i].areaNameZh+"</h5></div>\n" +
                    "                <div class=\"bianju quyu\">"
                    + ss + "</div>\n" +
                    "            </div>";
                // }
            }
        } else if (defaultLang == "la") {
            $('#detail').html(khfwData.customerService.detailLao);
            for (var i=0;i<company.length;i++){
                let ss = "";
                for (var j=0;j<company[i].companyList.length;j++){
                    let sss = "";
                    for (var k=0;k<company[i].companyList[j].companyOfficeList.length;k++){
                        sss = sss + "<div class=\"zi\">"+company[i].companyList[j].companyOfficeList[k].nameLao+":"+company[i].companyList[j].companyOfficeList[k].phone+"</div>";
                    }
                    ss = ss + "<div class=\"gongsi\">\n" +
                        "                        <div class=\"wenzi\">"+company[i].companyList[j].companyNameLao+"</div>\n" +
                        "                        <div class=\"zi\">"+company[i].companyList[j].addressLao+"</div>\n" +
                        "                        <div class=\"zi\">致电:"+company[i].companyList[j].phoneOne+"</div>\n" +
                        "                        <div class=\"zi\">致电:"+company[i].companyList[j].phoneTwo+"</div>\n" +
                        "                        <div class=\"zi\">传真:"+company[i].companyList[j].fax+"</div>"
                        + sss + "</div>";
                }
                // if (ss != ""){
                s = s + "<div class=\"bianju\">\n" +
                    "                <div><h5>"+company[i].areaNameLao+"</h5></div>\n" +
                    "                <div class=\"bianju quyu\">"
                    + ss + "</div>\n" +
                    "            </div>";
                // }
            }
        } else if (defaultLang == "en") {
            $('#detail').html(khfwData.customerService.detailEn);
            for (var i=0;i<company.length;i++){
                let ss = "";
                for (var j=0;j<company[i].companyList.length;j++){
                    let sss = "";
                    for (var k=0;k<company[i].companyList[j].companyOfficeList.length;k++){
                        sss = sss + "<div class=\"zi\">"+company[i].companyList[j].companyOfficeList[k].nameEn+":"+company[i].companyList[j].companyOfficeList[k].phone+"</div>";
                    }
                    ss = ss + "<div class=\"gongsi\">\n" +
                        "                        <div class=\"wenzi\">"+company[i].companyList[j].companyNameEn+"</div>\n" +
                        "                        <div class=\"zi\">"+company[i].companyList[j].addressEn+"</div>\n" +
                        "                        <div class=\"zi\">致电:"+company[i].companyList[j].phoneOne+"</div>\n" +
                        "                        <div class=\"zi\">致电:"+company[i].companyList[j].phoneTwo+"</div>\n" +
                        "                        <div class=\"zi\">传真:"+company[i].companyList[j].fax+"</div>"
                        + sss + "</div>";
                }
                // if (ss != ""){
                s = s + "<div class=\"bianju\">\n" +
                    "                <div><h5>"+company[i].areaNameEn+"</h5></div>\n" +
                    "                <div class=\"bianju quyu\">"
                    + ss + "</div>\n" +
                    "            </div>";
                // }
            }
        }
        $("#sjfgs").html(s);
    }

    $(function (){
        search();
    })
    function search() {
        // $.ajax({
        //     url: HOST+"webapi/product/getProductByType?type=3",
        //     type: "GET",
        //     success: function (res) {
        //         $("#pic-bac2").attr("src",res.data.picture);
        //         khfwData = res.data;
        //         khfwDataInit();
        //     }
        // })
        $.ajax({
            url: HOST+"webapi/aboutUs/getCustomerService",
            type: "GET",
            success: function (res) {
                if (res.code == 200){
                    $("#pic-bac2").attr("src",res.data.customerService.picture);
                    khfwData = res.data;
                    // khfwData = res.data.customerService;
                    khfwDataInit();
                    // let company = res.data.company;
                    // let s = "";
                    // for (var i=0;i<company.length;i++){
                    //     let ss = "";
                    //     for (var j=0;j<company[i].companyList.length;j++){
                    //         let sss = "";
                    //         for (var k=0;k<company[i].companyList[j].companyOfficeList.length;k++){
                    //             sss = sss + "<div class=\"zi\">"+company[i].companyList[j].companyOfficeList[k].nameZh+":"+company[i].companyList[j].companyOfficeList[k].phone+"</div>";
                    //         }
                    //         ss = ss + "<div class=\"gongsi\">\n" +
                    //             "                        <div class=\"wenzi\">"+company[i].companyList[j].companyNameZh+"</div>\n" +
                    //             "                        <div class=\"zi\">"+company[i].companyList[j].addressZh+"</div>\n" +
                    //             "                        <div class=\"zi\">致电:"+company[i].companyList[j].phoneOne+"</div>\n" +
                    //             "                        <div class=\"zi\">致电:"+company[i].companyList[j].phoneTwo+"</div>\n" +
                    //             "                        <div class=\"zi\">传真:"+company[i].companyList[j].fax+"</div>"
                    //         + sss + "</div>";
                    //     }
                    //     // if (ss != ""){
                    //         s = s + "<div class=\"bianju\">\n" +
                    //             "                <div><h5>"+company[i].areaNameZh+"</h5></div>\n" +
                    //             "                <div class=\"bianju quyu\">"
                    //             + ss + "</div>\n" +
                    //             "            </div>";
                    //     // }
                    // }
                    // $("#sjfgs").html(s);
                }
            }
        })
    }

</script>
</body>
</html>